package com.hsjk.szwj.module.mp.convert;

import com.hsjk.szwj.module.mp.controller.app.vo.AppAuthLoginRespVO;
import com.hsjk.szwj.module.mp.controller.app.vo.AppMpRespVO;
import com.hsjk.szwj.module.mp.dal.dataobject.MpConfigDO;
import com.hsjk.szwj.module.system.api.oauth2.dto.OAuth2AccessTokenRespDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/08/08 16:27
 **/
@Mapper
public interface MpConvert {
    MpConvert INSTANCE = Mappers.getMapper(MpConvert.class);

    AppMpRespVO convertAppMpRespVO(MpConfigDO mpConfigDO);

    @Mappings(@Mapping(target = "memberId",source = "userId"))
    AppAuthLoginRespVO convertAppAuthLoginRespVO(OAuth2AccessTokenRespDTO dto);
}
